function ETable(blockID,serverDownText,tableDim) {
    Table.call(this,blockID,serverDownText,tableDim);

    var editElement = '';
    this.enter = 13;

    var cutSpaces = function(s) {
        var i=0;
        var space = 32;
        var spec = 10;
        while(s.charCodeAt(i++)==space || s.charCodeAt(i-1)==spec);
        var j=s.length;
        while(s.charCodeAt(j--)==space || s.charCodeAt(j+1)==spec);
        return s.substring(i-1,j);
    }

    this.eboxKeyProcess = function(e) {
        var keynum;
        if(window.event) // IE
            keynum = e.keyCode;
        else if(e.which) // Netscape/Firefox/Opera
            keynum = e.which;

        if(keynum==this.enter){
            this.submitElement();
            return false;
	    }
        return true;
    }

    this.changeElement = function(elemID) {
        if(editElement==elemID)
            return;
        this.submitElement(editElement);
        editElement = elemID;
        var e = $(elemID);
        var cur = e.innerHTML;
        cur = cutSpaces(cur);
        s = '<input id="eboxOf'+elemID+'" type="text" value="'+cur+'" onKeyPress="return '+blockID+'.eboxKeyProcess(event)">';
        e.innerHTML = s;
    }
    
    this.fixElement = function(elemID) {
        if(!elemID && editElement)
            elemID = editElement;
        if(!elemID)
            return;
        var e = $(elemID);
        var ebox = $('eboxOf'+elemID);
        var cur = ebox.value;
        e.innerHTML = cur;
        editElement = '';
    }
    
    this.submitElement = function(elemID) {
        this.fixElement(elemID);
    }
    
    this.appendTr = function(dict) {
        alert(this.dom().rows.length);
    }
}
